package com.atstudent.gmall.product.controller;

import com.atstudent.gmall.common.result.Result;
import com.atstudent.gmall.product.service.BloomFilterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 分布式布隆过滤器重置接口
 * @Author 薛有朋
 * @CreatDate 2024/12/22 21:10
 **/
@RestController
@RequestMapping(value = "/admin/product/")
public class BloomFilterController {

    @Autowired
    private BloomFilterService bloomFilterService;


    /**
     * 重置布隆过滤器的接口
     * @Author 薛有朋
     * @Date 2024/12/22 21:12
     **/
    @GetMapping(value = "/resetBloomFilter")
    public Result resetBloomFilter(){
        bloomFilterService.resetBloomFilter();
        return Result.ok();
    }
}
